import javax.servlet.MultipartConfigElement;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;

@MapperScan("com.wl.zlmanage.mapper")
@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan("com")
@EnableScheduling
public class ZLManageApplication {

	public static void main(String[] args) {
		SpringApplication.run(ZLManageApplication.class, args);
	}


	@Bean
	public MultipartConfigElement multipartConfigElement() {
		MultipartConfigFactory factory = new MultipartConfigFactory();
		//单个文件最大
		factory.setMaxFileSize("4096KB"); //KB,MB
		/// 设置总上传数据总大小
		factory.setMaxRequestSize("40960KB");
		return factory.createMultipartConfig();
	}
}
